﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;

namespace EPE.Model
{
    public class CShopsPriceParaTree : INotifyPropertyChanged
    {

        public CShopsPriceParaTree(int argid, String argname, decimal argparavalue,decimal argresultvalue,String argproperty,String argcomment,String argprojectname)
        {
            paraid = argid;
            paraname = argname;
            paravalue = argparavalue;
            resultvalue = argresultvalue;
            property = argproperty;
            comment = argcomment;
            projectname = argprojectname;
        }
        private int _paraid;
        private int? _projectid;
        private int? _parentid;
        private string _paraname;
        private decimal? _paravalue;
        private decimal? _resultvalue;
        private string _property;
        private string _comment;
        private string _projectname;
        /// <summary>
        /// auto_increment
        /// </summary>
        public int paraid
        {
            set { _paraid = value; }
            get { return _paraid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? projectid
        {
            set { _projectid = value; }
            get { return _projectid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public int? parentid
        {
            set { _parentid = value; }
            get { return _parentid; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string paraname
        {
            set { _paraname = value; }
            get { return _paraname; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? paravalue
        {
            set { _paravalue = value; }
            get { return _paravalue; }
        }
        /// <summary>
        /// 
        /// </summary>
        public decimal? resultvalue
        {
            set { _resultvalue = value; }
            get { return _resultvalue; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string property
        {
            set { _property = value; }
            get { return _property; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string comment
        {
            set { _comment = value; }
            get { return _comment; }
        }
        /// <summary>
        /// 
        /// </summary>
        public string projectname
        {
            set { _projectname = value; }
            get { return _projectname; }
        }

        public event PropertyChangedEventHandler PropertyChanged;
        private double _marginLeft;
        public double MarginLeft
        {
            get
            {
                return _marginLeft;
            }
            set
            {
                _marginLeft = value;
            }
        }

        private bool _isChecked = false;
        public bool IsChecked
        {
            get
            {
                return _isChecked;
            }
            set
            {
                _isChecked = value;
                if (PropertyChanged != null)
                    PropertyChanged(this, new PropertyChangedEventArgs("IsChecked"));
            }
        }

        private Visibility _isVisible = Visibility.Visible;
        public Visibility IsVisible
        {
            get
            {
                return _isVisible;
            }
            set
            {
                _isVisible = value;
            }
        }

        private ObservableCollection<CShopsPriceParaTree> _subordinates;
        public ObservableCollection<CShopsPriceParaTree> Subordinates
        {
            get
            {
                return _subordinates ?? (_subordinates = new ObservableCollection<CShopsPriceParaTree>());
            }
            set
            {
                _subordinates = value;
            }
        }

    }
}
